package org.example.Day6.Hash;

import java.util.*;

public class Test1 {
    public static void main(String[] args){
        Map<String, List<String>> map = new HashMap<>();

        List<String> cities1 = new ArrayList<>();
        Collections.addAll(cities1,"南京市","扬州市","苏州市" ,"⽆锡市","常州市");
        map.put("江苏省",cities1);

        List<String> cities2 = new ArrayList<>();
        Collections.addAll(cities2,"武汉市","孝感市","⼗堰市","宜昌市","鄂州市");
        map.put("湖北省",cities2);

        List<String> cities3 = new ArrayList<>();
        Collections.addAll(cities3,"⽯家庄市","唐⼭市", "邢台市", "保定市", "张家⼝市");
        map.put("河北省",cities3);

        List<String> cities = map.get("湖北省");
        for(String city:cities){
            System.out.println(city);
        }

        map.forEach((p,c)->{
            System.out.println(p+"-->"+c);
        }
    );
    }
}
